package com.xyoto.takeawayBusiness.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @ClassName:
 * @Author: 挽风
 * @Date: 2022
 * @Copyright: 2022 by 挽风
 * @Description:
 **/

@ApiModel("修改商品")
@Data
public class UpdateShoppingDto {

    @ApiModelProperty(value = "商品id", required = true)
    @NotNull(message = "商品id不能为空")
    private Integer shoppingId;

    @ApiModelProperty(value = "商品类别id", required = false)
    private Integer shoppingTypeId;

    @ApiModelProperty(value = "商品名称", required = false)
    private String shoppingName;

    @ApiModelProperty(value = "价格（1元=100）", required = false)
    private Integer price;

    @ApiModelProperty(value = "图片", required = false)
    private MultipartFile path;

    @ApiModelProperty(value = "餐盒价格(1元=100)(默认0)", required = false)
    private Integer boxPrice;

    @ApiModelProperty(value = "描述", required = false)
    private String content;

    @ApiModelProperty(value = "商品规格集合", required = false)
    private String specList;

    @ApiModelProperty(value = "商品属性集合", required = false)
    private String propList;

    public UpdateShoppingDto(){
        this.boxPrice = 0;
    }
}
